<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>

<html lang="en">
<head>
<%@ include file="/common/common-css.jsp"%>

</head>
<body class="no-skin">
	<form name="queryForm" method="post">
	<div class="col-md-12">
		
		<div style="line-height:30px;margin-bottom:8px;"><input type="checkbox" id="direct_save" >已在加油公司查询确认！</div>
	</div>
	<div class="col-md-12">
		
			<button class="btn  btn-success no-border" name="btn-save" id="btn-save" >
				<i class="ace-icon fa fa-floppy-o bigger-160"></i> 确认
			</button>
		</div>
	</form>
	

<%@ include file="/common/common-js.jsp" %>
<script>
		function getQueryString(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
 			var r = window.location.search.substr(1).match(reg);
		if (r != null) return decodeURI(r[2]); return null;
 		}
			jQuery(function() {
				//【提交】按钮Click事件
				
				$("#btn-save").bind("click",function() {
					
					$("#btn-save").attr("disabled","disabled");
					if($("#direct_save").prop("checked")!=true){
						alert("请先进行查询确认！");
						$("#btn-save").removeAttr("disabled");
						return;
					}
					$("#btn-save").attr("disabled","disabled");
						 $.ajax({
							 url: ctx + "/jiayoukaspace/operate.action?id="+getQueryString("id")+"&type="+getQueryString("type")+"&status=6",
							 dataType:"json",
							 success: function(data){
								if(data.result.status != 1){
									alert(data.result.msg);
								}else{
									parent.parent['__extdialog_active'].dialog('close');
									parent.main_frame.query_any();	
								}
							}
					});
				});
				
			});
	</script>
</body>
</html>